package com.service;

import com.dao.WagesDao;
import com.pojo.Wages;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class WagesService {
    @Resource
    private WagesDao dao;
    /*查询工资信息*/
    public List<Wages> queryWages(int pageIndex,int pageSize){
        return dao.queryWages(pageIndex, pageSize);
    }
    /*查询总记录数*/
    public int countAll(){
        return dao.countAll();
    }
    /*根据条件查询工资信息*/
    public List<Wages> queryby(int pageIndex,int pageSize,String username,String deptname,String jobname,int start,int end){
        return dao.queryBy(pageIndex, pageSize, username, deptname, jobname,start,end);
    }
    /*修改工资信息*/
    public int updateWages(int wid,int wagescount)
    {
        return dao.updateWages(wid, wagescount);
    }
    /*根据id查询信息*/
    public  Wages queryWagesByID(int wid)
    {
        return dao.queryWagesByID(wid);
    }
    /*根据name查询*/
    public Wages queryByName(String name){
        return dao.queryWagesByName(name);
    }
    public List<Wages> queryByName2(String name){
        return dao.queryWagesByName2(name);
    }

    public int addWages(Wages wages){
        return dao.addWages(wages);
    }
}
